<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<link href="${ctxStatic}/jquery/font-awesome.4.6.0.css" rel="stylesheet" media="screen">
<link rel="stylesheet" href="${ctxStatic}/dist/sidebar-menu.css">
<style type="text/css">
.main-sidebar{
	position: absolute;
/* 	top: 94px; */
	left: 10;
	height: 652px;
	width: 200px;
	z-index: 810;
 	background-color: rgba(236, 221, 223, 0.15);
	border-radius: 8px;
 }
 a i{
 color:#b8c7ce
 }
 .ll.active{
 background-color:#ce4949;
 }
</style>
<aside class="main-sidebar">
<section  class="sidebar">
	<ul class="sidebar-menu">
		<c:if test="${pageContext.request.remoteUser != null}">
			<c:set var="menuList" value="${fns:getMenuList()}" />
			<c:set var="topMenuId" value="${not empty top?top:''}" />
			<c:set var="activeMenu" value="${fns:encodeParam(left)}" />
			<c:set var="LId" value="${fns:encodeParam(LId)}"/>
			<c:set var="parentId" value="${fns:encodeParam(parentId)}"/>
			<c:forEach items="${menuList}" var="menu" varStatus="idxStatus">
				<c:if test="${menu.parent.id eq topMenuId}">
					<li class="treeview ${activeMenu==menu.id?'active':''}">
						<c:choose>
							<c:when test="${activeMenu!=LId}">
								<a href="#">
							</c:when>
							<c:otherwise>
								<a href="${fn:indexOf(menu.href, '://') eq -1?ctx:''}${menu.href}${fn:indexOf(menu.href, '?') eq -1?'?':'&'}left=${menu.id}&top=${topMenuId}&parentId=${fns:encodeParamUrl(parentId)}&LId=${menu.id}">
							</c:otherwise>
						</c:choose>
							<i class="fa fa-folder"></i>
							<span>${menu.name}</span>
							<i class="fa fa-angle-right pull-right"></i>
						</a>
						<c:if test="${activeMenu!=LId}">
						<ul class="treeview-menu">
					<c:forEach items="${menuList}" var="menuChild">
						<c:if test="${menuChild.parent.id eq menu.id}">
							<li   class="ll ${LId==menuChild.id?'active':''}">
								<a href="${fn:indexOf(menuChild.href, '://') eq -1?ctx:''}${menuChild.href}${fn:indexOf(menuChild.href, '?') eq -1?'?':'&'}left=${menu.id}&top=${topMenuId}&parentId=${fns:encodeParamUrl(parentId)}&LId=${menuChild.id}">
									<i class="fa fa-circle-o"></i>${menuChild.name}<i class="fa fa-angle-right pull-right"></i>
								</a>
							</li>
						</c:if>
					</c:forEach>
						</ul>
						</c:if>
					</li>
				</c:if>
			</c:forEach>
		</c:if>
	</ul>
  </section>
 </aside>
<script src="${ctxStatic}/dist/sidebar-menu.js"></script>
<script>
$.sidebarMenu($('.sidebar-menu'))
</script>